﻿using System;
using System.Collections.Generic;

namespace File.Api.Models
{
    public class IQCOrderModel
    {
        public string Id { get; set; }

        /// <summary>
        /// 0--整灯，1--控安
        /// </summary>
        public int KABU { get; set; }

        public int Type { get; set; }

        public string Code { get; set; }

        public string SapCode { get; set; }

        /// <summary>
        /// 特采单号
        /// </summary>
        public string DeviationCode { get; set; }

        /// <summary>
        /// 确认状态 0--已确认，1--未确认
        /// </summary>
        public int Status { get; set; }

        public string OrgId { get; set; }

        /// <summary>
        /// 工厂编号（3306，3321）
        /// </summary>
        public string OrgCode { get; set; }

        /// <summary>
        /// 库位
        /// </summary>
        public string WarehouseCode { get; set; }

        /// <summary>
        /// 产品
        /// </summary>
        public string ProductId { get; set; }

        public string ProductCode { get; set; }

        public string ProductName { get; set; }

        /// <summary>
        /// 供应商编号
        /// </summary>
        public string ProviderCode { get; set; }

        public string ProviderId { get; set; }

        /// <summary>
        /// sap 供应商名称
        /// </summary>
        public string ProviderName { get; set; }

        /// <summary>
        /// 客户
        /// </summary>
        public string CustomerName { get; set; }

        /// <summary>
        /// 销售单号
        /// </summary>
        public string SaleCode { get; set; }

        public string SaleRow { get; set; }

        public DateTime CreateTime { get; set; }

        public decimal SendQty { get; set; }

        public string CheckUserName { get; set; }

        public int DecisionPolicy { get; set; }

        public string Remark { get; set; }

        public int OrderType { get; set; }

        /// <summary>
        /// 是否新品
        /// </summary>
        public bool IsNew { get; set; }

        /// <summary>
        /// 是否急料
        /// </summary>
        public bool IsUrgent { get; set; }

        /// <summary>
        /// 是否合格供应商--0-合格，1-不合格
        /// </summary>
        public int IsQualified { get; set; }

        /// <summary>
        /// 是否合格合宜供应商--0-合格，1-不合格
        /// </summary>
        public int IsHeyiQualified { get; set; }

        public int? RSSRReportDay { get; set; }

        /// <summary>
        /// RSSR报告状态  -1 未获取报告日期，0-正常，1，报告小于10天预警，2-已过期报警
        /// </summary>
        public int RSSRReportStatus { get; set; }

        public string AreaName { get; set; }

        public string ResponsibleUser { get; set; }

        public int OrderStatus { get; set; }

        /// <summary>
        /// 抽样等级
        /// </summary>
        public int SamplingLevel { get; set; }

        /// <summary>
        /// 触发LCP异常单
        /// </summary>
        public bool ISLcpException { get; set; }

        public string LcpExceptionCode { get; set; }

        /// <summary>
        /// 触发SRM异常单
        /// </summary>
        public bool ISSrmException { get; set; }

        public string UserId { get; set; }

        /// <summary>
        /// 是否回写SAP
        /// </summary>
        public bool IsUpdateSap { get; set; }

        public string StorageCode { get; set; }

        /// <summary>
        /// 生产日期
        /// </summary>
        public string MfgDate { get; set; }

        public string AuditUser { get; set; }

        public string Result { get; set; }

        public IQCOrderDetailModel DetailModel { get; set; } = new IQCOrderDetailModel();

        public List<IQCOrderDetailModel> DetailModels { get; set; } = new List<IQCOrderDetailModel>();

        public List<IQCOrderVersionModel> VersionModels { get; set; } = new List<IQCOrderVersionModel>();
    }
}
